package com.ekuaitu.kuaitustaff.utils.ble.bean;


import com.ekuaitu.kuaitustaff.utils.ble.enmu.MsgSendType;

import java.util.Arrays;

/**
 * Created by xiongjida on 2017/7/1.
 */

public class OrderCmd {

    private byte[] cmd;// 完整指令

    private ControlResult result;// 控制使用

    private MsgSendType type;

    private String pwd;// 控制密码

    private String cmdS;// 指令名称，例如（B501--电动车锁门）

    private boolean isNormalCode;// 是否是6001回复指令

    public OrderCmd() {
    }

    public OrderCmd(byte[] cmd) {
        this.cmd = cmd;
    }

    public OrderCmd(byte[] cmd, ControlResult result) {
        this.cmd = cmd;
        this.result = result;
    }

    public OrderCmd(byte[] cmd, ControlResult result, MsgSendType type, String pwd, String cmdS) {
        this.cmd = cmd;
        this.result = result;
        this.type = type;
        this.pwd = pwd;
        this.cmdS = cmdS;
    }

    public byte[] getCmd() {
        return cmd;
    }

    public void setCmd(byte[] cmd) {
        this.cmd = cmd;
    }

    public ControlResult getResult() {
        return result;
    }

    public void setResult(ControlResult result) {
        this.result = result;
    }

    public MsgSendType getType() {
        return type;
    }

    public void setType(MsgSendType type) {
        this.type = type;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getCmdS() {
        return cmdS;
    }

    public void setCmdS(String cmdS) {
        this.cmdS = cmdS;
    }

    public boolean isNormalCode() {
        return isNormalCode;
    }

    public void setNormalCode(boolean normalCode) {
        isNormalCode = normalCode;
    }

    @Override
    public String toString() {
        return "OrderCmd{" +
                "cmd=" + Arrays.toString(cmd) +
                ", result=" + result +
                ", type=" + type.name() + "  " + type.getType() +
                ", pwd='" + pwd + '\'' +
                ", cmdS='" + cmdS + '\'' +
                ", isNormalCode=" + isNormalCode +
                '}';
    }
}
